﻿<?xml version="1.0" encoding="utf-8"?>
<UpdateScripts fileSchemaVersion="1" fileHelpVersion="1">
	<UpdateScript>IF EXISTS (SELECT 1 FROM DocmahPages WHERE Id = 2) BEGIN 
	UPDATE DocmahPages SET PageTypeId = 2,ParentPageId = NULL,[Order] = 0,SourceUrl = NULL,Title = 'DocMAH Documentation',Content = '&lt;p&gt;This will be the landing page for the DocMAH documentation.&lt;/p&gt;
&lt;p&gt;Beneath this entry you will find another custom documentation page about something, as well as a mock up of the home page.&lt;/p&gt;
',VerticalOffset = NULL,HorizontalOffset = NULL,OffsetElementId = NULL,DocImageUrl = NULL,DocVerticalOffset = NULL,DocHorizontalOffset = NULL,IsHidden = 0 WHERE Id = 2
END ELSE BEGIN
	INSERT DocmahPages(Id,PageTypeId,ParentPageId,[Order],SourceUrl,Title,Content,VerticalOffset,HorizontalOffset,OffsetElementId,DocImageUrl,DocVerticalOffset,DocHorizontalOffset,IsHidden) VALUES (2,2,NULL,0,NULL,'DocMAH Documentation','&lt;p&gt;This will be the landing page for the DocMAH documentation.&lt;/p&gt;
&lt;p&gt;Beneath this entry you will find another custom documentation page about something, as well as a mock up of the home page.&lt;/p&gt;
',NULL,NULL,NULL,NULL,NULL,NULL,0)
END
</UpdateScript>
	<UpdateScript>
		IF EXISTS (SELECT 1 FROM DocmahPages WHERE Id = 1) BEGIN
		UPDATE DocmahPages SET PageTypeId = 1,ParentPageId = 2,[Order] = 0,SourceUrl = '/',Title = 'Home Page Help',Content = 'This is the home page of the DocMAH MVC Harness web application.',VerticalOffset = -207,HorizontalOffset = 76,OffsetElementId = 'learnMoreButton',DocImageUrl = '/Images/Help/HomePage.png',DocVerticalOffset = 98,DocHorizontalOffset = 308,IsHidden = 1 WHERE Id = 1
		END ELSE BEGIN
		INSERT DocmahPages(Id,PageTypeId,ParentPageId,[Order],SourceUrl,Title,Content,VerticalOffset,HorizontalOffset,OffsetElementId,DocImageUrl,DocVerticalOffset,DocHorizontalOffset,IsHidden) VALUES (1,1,2,0,'/','Home Page Help','This is the home page of the DocMAH MVC Harness web application.',-207,76,'learnMoreButton','/Images/Help/HomePage.png',98,308,1)
		END
	</UpdateScript>
	<UpdateScript>IF EXISTS (SELECT 1 FROM DocmahPages WHERE Id = 3) BEGIN 
	UPDATE DocmahPages SET PageTypeId = 2,ParentPageId = 2,[Order] = 1,SourceUrl = NULL,Title = 'Setup DocMAH',Content = '&lt;p&gt;This page will contain the initial setup steps including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pull from NuGet.&lt;/li&gt;
&lt;li&gt;Required configuration file updates. (handled by NuGet)&lt;/li&gt;
&lt;li&gt;Optional configuration settings.&lt;/li&gt;
&lt;/ul&gt;',VerticalOffset = NULL,HorizontalOffset = NULL,OffsetElementId = NULL,DocImageUrl = NULL,DocVerticalOffset = NULL,DocHorizontalOffset = NULL,IsHidden = 0 WHERE Id = 3
END ELSE BEGIN
	INSERT DocmahPages(Id,PageTypeId,ParentPageId,[Order],SourceUrl,Title,Content,VerticalOffset,HorizontalOffset,OffsetElementId,DocImageUrl,DocVerticalOffset,DocHorizontalOffset,IsHidden) VALUES (3,2,2,1,NULL,'Setup DocMAH','&lt;p&gt;This page will contain the initial setup steps including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Pull from NuGet.&lt;/li&gt;
&lt;li&gt;Required configuration file updates. (handled by NuGet)&lt;/li&gt;
&lt;li&gt;Optional configuration settings.&lt;/li&gt;
&lt;/ul&gt;',NULL,NULL,NULL,NULL,NULL,NULL,0)
END
</UpdateScript>
	<UpdateScript>IF EXISTS (SELECT 1 FROM DocmahPages WHERE Id = 4) BEGIN 
	UPDATE DocmahPages SET PageTypeId = 2,ParentPageId = 2,[Order] = 2,SourceUrl = NULL,Title = 'Create First Time Help',Content = 'Description of how to use the First Time Help editor.',VerticalOffset = NULL,HorizontalOffset = NULL,OffsetElementId = NULL,DocImageUrl = NULL,DocVerticalOffset = NULL,DocHorizontalOffset = NULL,IsHidden = 0 WHERE Id = 4
END ELSE BEGIN
	INSERT DocmahPages(Id,PageTypeId,ParentPageId,[Order],SourceUrl,Title,Content,VerticalOffset,HorizontalOffset,OffsetElementId,DocImageUrl,DocVerticalOffset,DocHorizontalOffset,IsHidden) VALUES (4,2,2,2,NULL,'Create First Time Help','Description of how to use the First Time Help editor.',NULL,NULL,NULL,NULL,NULL,NULL,0)
END
</UpdateScript>
	<UpdateScript>IF EXISTS (SELECT 1 FROM DocmahPages WHERE Id = 5) BEGIN 
	UPDATE DocmahPages SET PageTypeId = 2,ParentPageId = 2,[Order] = 3,SourceUrl = NULL,Title = 'Create Documentation',Content = 'Description of how to use the documentation editor.',VerticalOffset = NULL,HorizontalOffset = NULL,OffsetElementId = NULL,DocImageUrl = NULL,DocVerticalOffset = NULL,DocHorizontalOffset = NULL,IsHidden = 0 WHERE Id = 5
END ELSE BEGIN
	INSERT DocmahPages(Id,PageTypeId,ParentPageId,[Order],SourceUrl,Title,Content,VerticalOffset,HorizontalOffset,OffsetElementId,DocImageUrl,DocVerticalOffset,DocHorizontalOffset,IsHidden) VALUES (5,2,2,3,NULL,'Create Documentation','Description of how to use the documentation editor.',NULL,NULL,NULL,NULL,NULL,NULL,0)
END
</UpdateScript>
	<UpdateScript>IF EXISTS (SELECT 1 FROM DocmahPages WHERE Id = 6) BEGIN 
	UPDATE DocmahPages SET PageTypeId = 2,ParentPageId = 2,[Order] = 4,SourceUrl = NULL,Title = 'Hook Up Help Button',Content = 'Describes how to create a help button on the base web site that launches DocMAH help components.',VerticalOffset = NULL,HorizontalOffset = NULL,OffsetElementId = NULL,DocImageUrl = NULL,DocVerticalOffset = NULL,DocHorizontalOffset = NULL,IsHidden = 0 WHERE Id = 6
END ELSE BEGIN
	INSERT DocmahPages(Id,PageTypeId,ParentPageId,[Order],SourceUrl,Title,Content,VerticalOffset,HorizontalOffset,OffsetElementId,DocImageUrl,DocVerticalOffset,DocHorizontalOffset,IsHidden) VALUES (6,2,2,4,NULL,'Hook Up Help Button','Describes how to create a help button on the base web site that launches DocMAH help components.',NULL,NULL,NULL,NULL,NULL,NULL,0)
END
</UpdateScript>
	<UpdateScript>IF EXISTS (SELECT 1 FROM DocmahPages WHERE Id = 7) BEGIN 
	UPDATE DocmahPages SET PageTypeId = 2,ParentPageId = 2,[Order] = 5,SourceUrl = NULL,Title = 'Styling DocMAH',Content = 'Detailed instructions on using optional configuration to override default style for first time help and documentation pages.',VerticalOffset = NULL,HorizontalOffset = NULL,OffsetElementId = NULL,DocImageUrl = NULL,DocVerticalOffset = NULL,DocHorizontalOffset = NULL,IsHidden = 0 WHERE Id = 7
END ELSE BEGIN
	INSERT DocmahPages(Id,PageTypeId,ParentPageId,[Order],SourceUrl,Title,Content,VerticalOffset,HorizontalOffset,OffsetElementId,DocImageUrl,DocVerticalOffset,DocHorizontalOffset,IsHidden) VALUES (7,2,2,5,NULL,'Styling DocMAH','Detailed instructions on using optional configuration to override default style for first time help and documentation pages.',NULL,NULL,NULL,NULL,NULL,NULL,0)
END
</UpdateScript>
	<UpdateScript>IF EXISTS (SELECT 1 FROM DocmahPages WHERE Id = 8) BEGIN 
	UPDATE DocmahPages SET PageTypeId = 2,ParentPageId = 2,[Order] = 6,SourceUrl = NULL,Title = 'Production Installation',Content = 'Walks through using the ''Generate Install Scripts'' button and the content XML file to automatically deploy help content to production servers.',VerticalOffset = NULL,HorizontalOffset = NULL,OffsetElementId = NULL,DocImageUrl = NULL,DocVerticalOffset = NULL,DocHorizontalOffset = NULL,IsHidden = 0 WHERE Id = 8
END ELSE BEGIN
	INSERT DocmahPages(Id,PageTypeId,ParentPageId,[Order],SourceUrl,Title,Content,VerticalOffset,HorizontalOffset,OffsetElementId,DocImageUrl,DocVerticalOffset,DocHorizontalOffset,IsHidden) VALUES (8,2,2,6,NULL,'Production Installation','Walks through using the ''Generate Install Scripts'' button and the content XML file to automatically deploy help content to production servers.',NULL,NULL,NULL,NULL,NULL,NULL,0)
END
</UpdateScript>
	<UpdateScript>DELETE DocmahBullets WHERE PageId NOT IN(2,1,3,4,5,6,7,8);
</UpdateScript>
	<UpdateScript>DELETE DocmahPageUrls;
</UpdateScript>
	<UpdateScript>DELETE DocmahUserPageSettings WHERE PageId NOT IN(2,1,3,4,5,6,7,8);
</UpdateScript>
	<UpdateScript>DELETE DocmahPages WHERE Id NOT IN(2,1,3,4,5,6,7,8);
</UpdateScript>
	<UpdateScript>INSERT DocmahPageUrls VALUES ('/',1);
</UpdateScript>
	<UpdateScript>INSERT DocmahPageUrls VALUES ('/Home',1);
</UpdateScript>
	<UpdateScript>INSERT DocmahPageUrls VALUES ('/Home/',1);
</UpdateScript>
	<UpdateScript>INSERT DocmahPageUrls VALUES ('/Home/Index%',1);
</UpdateScript>
	<UpdateScript>IF( (SELECT COUNT(*) FROM DocmahBullets WHERE Id = 1) = 1)BEGIN
	UPDATE DocmahBullets SET PageId = 1,Number = 1,Text = 'Learn more about ASP.NET from the DocMAH home page.',VerticalOffset = 10,HorizontalOffset = 159,OffsetElementId = 'learnMoreButton',DocVerticalOffset = 279,DocHorizontalOffset = 280 WHERE Id = 1
END ELSE BEGIN
	INSERT DocmahBullets(Id,PageId,Number,Text,VerticalOffset,HorizontalOffset,OffsetElementId,DocVerticalOffset,DocHorizontalOffset) VALUES (1,1,1,'Learn more about ASP.NET from the DocMAH home page.',10,159,'learnMoreButton',279,280)
END
</UpdateScript>
	<UpdateScript>IF( (SELECT COUNT(*) FROM DocmahBullets WHERE Id = 2) = 1)BEGIN
	UPDATE DocmahBullets SET PageId = 1,Number = 2,Text = 'Hosting your DocMAH enabled web application someplace else.',VerticalOffset = 1,HorizontalOffset = -50,OffsetElementId = 'webHostingLearnMoreButton',DocVerticalOffset = 537,DocHorizontalOffset = 659 WHERE Id = 2
END ELSE BEGIN
	INSERT DocmahBullets(Id,PageId,Number,Text,VerticalOffset,HorizontalOffset,OffsetElementId,DocVerticalOffset,DocHorizontalOffset) VALUES (2,1,2,'Hosting your DocMAH enabled web application someplace else.',1,-50,'webHostingLearnMoreButton',537,659)
END
</UpdateScript>
	<UpdateScript>DELETE DocmahBullets WHERE Id NOT IN(1,2);
</UpdateScript>
	<UpdateScript>UPDATE DocmahConfiguration SET [Value] = 1 WHERE [Name] = 'DatabaseHelpVersion';
</UpdateScript>
</UpdateScripts>